import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/home.vue'
import New from '../components/new.vue'
import Sport from '../components/sport.vue'
import SportHome from '../components/views/sportHome.vue'
import InSport from '../components/views/inSport.vue'
import OutSport from '../components/views/outSport.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    component: Home
  },
  {
    path: '/new',
    component: New
  },
  {
    path: '/sport',
    component: Sport,
    children: [
      {
        path: 'sportHome',
        component: SportHome,
      },
      {
        path: 'inSport',
        component: InSport,
      }, {
        path: 'outSport',
        component: OutSport,
      }
    ]
  },

]

const router = new VueRouter({
  routes
})

export default router
